package model

import (
	"gorm.io/gorm"
)

type AdminButton struct {
	gorm.Model
	Uid           uint        `json:"uid" gorm:"not null;default:0;"`
	Name          string      `json:"name" gorm:"not null;default:'';comment:按钮名称"`
	Icon          string      `json:"icon" gorm:"not null;default:'';comment:图标;"`
	Func          string      `json:"func" gorm:"not null;default:'';comment:方法名;"`
	Place         ButtonPlace `json:"place" gorm:"not null;default:0;comment:按钮位置;"`
	Sort          int         `json:"sort" gorm:"not null;default:0;"`
	SelectedCount int8        `json:"selectedCount" gorm:"not null;default:0;comment:1=显示表格选中的数量;"`
	Tip           int8        `json:"tip" gorm:"not null;default:0;comment:是否提示"`
	TipContent    string      `json:"tipContent" gorm:"not null;default:'';comment:提示内容"`
	OtherConf     string      `json:"otherConf" gorm:"not null;default:'';"`
	Memo          string      `json:"memo" gorm:"not null;default:'';"`
}

type ButtonPlace int

const (
	Top_Left ButtonPlace = iota
	Top_Right
	Table_Inner
	Other
)
